package book;
//书的存储类
public class BookList {
    private int bookSize;//书籍数量
    private Book[] books=new Book[10];//书籍顺序表
    public BookList() {
        books[0]=new Book("鲨鱼辣椒","李富贵",20,"反派");//存入书籍
        books[1]=new Book("蝎子莱莱","王二狗",10,"反派");//存入书籍
        books[2]=new Book("蜻蜓队长","张狗蛋",60,"正义");//存入书籍
        books[3]=new Book("丸子轮","刘铁根",55,"正义");//存入书籍
        books[4]=new Book("蜘蛛侦探","赵三立",93,"正义");//存入书籍
        this.bookSize=5;//更改书籍数量
    }
    public int getBookSize() {
        return bookSize;
    }//获得书籍数量

    public void setBookSize(int booksize) {
        this.bookSize = booksize;
    }//更改书籍数量

    public Book getBooks(int pos) {
        return books[pos];
    }//获得pos位置的书籍

    public void setBooks(Book books, int pos) {
        this.books[pos] = books;
    }//更改pos位置的书籍
}
